package com.ruoyi.his.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.List;
import java.util.Map;

import com.ruoyi.his.domain.WarnPreLog;
import com.ruoyi.his.domain.vo.HisLogVo;
import org.apache.ibatis.annotations.Param;

/**
 * 处方预警Mapper接口
 * 
 * @author Alan
 * @date 2024-03-09
 */
public interface WarnPreLogMapper extends BaseMapper<WarnPreLog>
{

    /**
     * 统计不同类型机构预警数
     *
     *
     * @return 预警数
     */
    public int  selectWarnAllCount();
    /**
     * 查询处方预警
     * 
     * @param preId 处方预警主键
     * @return 处方预警
     */
    public WarnPreLog selectWarnPreLogByPreId(String preId);

    /**
     * 查询处方预警列表
     * 
     * @param warnPreLog 处方预警
     * @return 处方预警集合
     */
    public List<WarnPreLog> selectWarnPreLogList(WarnPreLog warnPreLog);

    /**
     * 新增处方预警
     * 
     * @param warnPreLog 处方预警
     * @return 结果
     */
    public int insertWarnPreLog(WarnPreLog warnPreLog);

    /**
     * 修改处方预警
     * 
     * @param warnPreLog 处方预警
     * @return 结果
     */
    public int updateWarnPreLog(WarnPreLog warnPreLog);

    /**
     * 删除处方预警
     * 
     * @param preId 处方预警主键
     * @return 结果
     */
    public int deleteWarnPreLogByPreId(String preId);

    /**
     * 批量删除处方预警
     * 
     * @param preIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWarnPreLogByPreIds(String[] preIds);

    List<Map> toDayWarn();

    List<Map> toDayWarnHos(@Param("hospitalIds")List<String> hospitalIds, @Param("signatures")List<String> signatures);

    List<Map> toDayWarnPre(@Param("hospitalIds")List<String> hospitalIds,@Param("signatures") List<String> signatures);

    Map toDayWarnHosInfo(@Param("hospitalId") String hospitalId, @Param("signature") String signature);

    Map toDayWarnPreInfo(@Param("hospitalId") String hospitalId, @Param("signature") String signature);

    long selectPreLogDate(HisLogVo vo);
    long selectHosLogDate(HisLogVo vo);

    WarnPreLog getById(Long id);

    int selectWarnPreLogListCount(@Param("number")String number,@Param("signature")String signature);
}
